#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include <cuda_runtime.h>
#include <iostream>
#include "device_launch_parameters.h"
#include "para.h"
#include "physical_properties.h"

#define THREAD_NUM 1024

void printCudaProp(const cudaDeviceProp& prop);
bool Init_CUDA();

__global__ void autocorr_CUDA_1(double* veloc, double* elem, int nstep);
__global__ void autocorr_CUDA_2(double* elem, int nstep, int Tau, double* acf);
__global__ void result_atom_sum_CUDA(double* result, double* acf, int nstep, int seq, int tau);
	__global__ void result_sys_sum_CUDA(double* result_sys, double* result_atom, int natoms, int tau);
__global__ void calculate_diff_CUDA(double* diff, double* result_sys, int nsteps);


double autocorr_CUDA(int seq, int tau);
double Diffusion_Coefficient_CUDA();
double* autoccor_store_CUDA();
